Next | Prev | Up | Top | Contents | Index

Manual vs. Automatic Invocation

All of the vector intrinsics can be called explicitly from your program. In Fortran the following example invokes the vector intrinsic vexpf().

real*4 x(N), y(N)
integer*8 N, i
    i = 1
    call vexpf$( %val(%loc(x(1))),
    &            %val(%loc(y(1))),
    &            %val(N),%val(i),%val(i))
    end
The compiler at optimization level -O3 also recognizes the use of scalar versions of these intrinsics on array elements inside loops and turns them into calls to the vector versions. If you need to turn this feature off to improve the accuracy of your results, add -OPT:vector_intrinsics=OFF to your compilation command line or switch to a lower optimization level.

The compiler, however, is limited in its ability to recognize vector intrinsics. It does not generate calls to vector intrinsics in expressions that necessitate the generation of a temporary variable.


Next | Prev | Up | Top | Contents | Index